{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "1af3697f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.608697Z",
     "start_time": "2022-02-25T04:18:39.270768Z"
    }
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from tensorflow import keras\n",
    "import tensorflow as tf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "bd5f822c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.624701Z",
     "start_time": "2022-02-25T04:18:40.609730Z"
    }
   },
   "outputs": [],
   "source": [
    "data = pd.read_csv(r'train.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9d33ae7a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.640636Z",
     "start_time": "2022-02-25T04:18:40.625703Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Id</th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 81 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Id  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape  \\\n",
       "0   1          60       RL         65.0     8450   Pave   NaN      Reg   \n",
       "1   2          20       RL         80.0     9600   Pave   NaN      Reg   \n",
       "2   3          60       RL         68.0    11250   Pave   NaN      IR1   \n",
       "3   4          70       RL         60.0     9550   Pave   NaN      IR1   \n",
       "4   5          60       RL         84.0    14260   Pave   NaN      IR1   \n",
       "\n",
       "  LandContour Utilities  ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold  \\\n",
       "0         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "1         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      5   \n",
       "2         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      9   \n",
       "3         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "4         Lvl    AllPub  ...        0    NaN   NaN         NaN       0     12   \n",
       "\n",
       "  YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0   2008        WD         Normal     208500  \n",
       "1   2007        WD         Normal     181500  \n",
       "2   2008        WD         Normal     223500  \n",
       "3   2006        WD        Abnorml     140000  \n",
       "4   2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 81 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ca30b309",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.656333Z",
     "start_time": "2022-02-25T04:18:40.641150Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1460, 81)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "24f893b0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.671332Z",
     "start_time": "2022-02-25T04:18:40.657345Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop('Id', axis=1, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "46ca91f0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.686599Z",
     "start_time": "2022-02-25T04:18:40.671332Z"
    }
   },
   "outputs": [],
   "source": [
    "data.MSSubClass = data.MSSubClass.astype(str) # MSSubClass"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "cf580a07",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.702055Z",
     "start_time": "2022-02-25T04:18:40.687624Z"
    }
   },
   "outputs": [],
   "source": [
    "def loss_rate(x):  # x is DataFrmae type\n",
    "    table = ((x.isnull().sum()) /\n",
    "             x.shape[0]).sort_values(ascending=False).map(lambda i:\"{:.2%}\".format(i))\n",
    "    return table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "a9dfc3d4",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:40.748073Z",
     "start_time": "2022-02-25T04:18:40.741069Z"
    }
   },
   "outputs": [],
   "source": [
    "data.LotFrontage.fillna(data.LotFrontage.mean(), inplace=True)  # mean value fill"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bc5c4e7e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:41.173183Z",
     "start_time": "2022-02-25T04:18:41.168187Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.Electrical.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "ca6c8a17",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:41.375833Z",
     "start_time": "2022-02-25T04:18:41.366834Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "None       863\n",
       "BrkFace    445\n",
       "Stone      128\n",
       "BrkCmn      15\n",
       "Name: MasVnrType, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.MasVnrType.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "fae95db5",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:41.576020Z",
     "start_time": "2022-02-25T04:18:41.567013Z"
    }
   },
   "outputs": [],
   "source": [
    "data.MasVnrType = data.MasVnrType.fillna('None')  # mode value fill"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "51edb710",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:42.013076Z",
     "start_time": "2022-02-25T04:18:42.006069Z"
    }
   },
   "outputs": [],
   "source": [
    "data.MasVnrArea.fillna(data.MasVnrArea.mean(), inplace=True)  # mean value fill"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "2763dc47",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:42.499769Z",
     "start_time": "2022-02-25T04:18:42.481771Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.BsmtQual.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "2f4453c1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:42.934462Z",
     "start_time": "2022-02-25T04:18:42.917464Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.BsmtFinType1.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "4ebf3d82",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:43.257581Z",
     "start_time": "2022-02-25T04:18:43.254577Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.BsmtExposure.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "7feeb634",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:43.509976Z",
     "start_time": "2022-02-25T04:18:43.503968Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.BsmtFinType2.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "b11011b5",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:44.036051Z",
     "start_time": "2022-02-25T04:18:44.021052Z"
    }
   },
   "outputs": [],
   "source": [
    "data.drop(data[data.GarageYrBlt.isna()].index, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "801bd997",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:33:45.507747Z",
     "start_time": "2022-02-25T04:33:45.488814Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>LotConfig</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>-0.254916</td>\n",
       "      <td>-0.219483</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Inside</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.071556</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>-0.084282</td>\n",
       "      <td>-1.604232</td>\n",
       "      <td>0.145874</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>0.422530</td>\n",
       "      <td>-0.108069</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>FR2</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.071556</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>-0.084282</td>\n",
       "      <td>-0.494244</td>\n",
       "      <td>-0.606409</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>-0.119427</td>\n",
       "      <td>0.051786</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Inside</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.071556</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>-0.084282</td>\n",
       "      <td>0.985739</td>\n",
       "      <td>0.145874</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>-0.480732</td>\n",
       "      <td>-0.112913</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Corner</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.071556</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>-0.084282</td>\n",
       "      <td>-1.604232</td>\n",
       "      <td>-1.358692</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>0.603183</td>\n",
       "      <td>0.343400</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>FR2</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.071556</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>-0.084282</td>\n",
       "      <td>2.095727</td>\n",
       "      <td>0.145874</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 80 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  MSSubClass MSZoning  LotFrontage   LotArea Street Alley LotShape  \\\n",
       "0         60       RL    -0.254916 -0.219483   Pave  None      Reg   \n",
       "1         20       RL     0.422530 -0.108069   Pave  None      Reg   \n",
       "2         60       RL    -0.119427  0.051786   Pave  None      IR1   \n",
       "3         70       RL    -0.480732 -0.112913   Pave  None      IR1   \n",
       "4         60       RL     0.603183  0.343400   Pave  None      IR1   \n",
       "\n",
       "  LandContour Utilities LotConfig  ...  PoolArea PoolQC Fence MiscFeature  \\\n",
       "0         Lvl    AllPub    Inside  ... -0.071556   None  None        None   \n",
       "1         Lvl    AllPub       FR2  ... -0.071556   None  None        None   \n",
       "2         Lvl    AllPub    Inside  ... -0.071556   None  None        None   \n",
       "3         Lvl    AllPub    Corner  ... -0.071556   None  None        None   \n",
       "4         Lvl    AllPub       FR2  ... -0.071556   None  None        None   \n",
       "\n",
       "    MiscVal    MoSold    YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0 -0.084282 -1.604232  0.145874        WD         Normal     208500  \n",
       "1 -0.084282 -0.494244 -0.606409        WD         Normal     181500  \n",
       "2 -0.084282  0.985739  0.145874        WD         Normal     223500  \n",
       "3 -0.084282 -1.604232 -1.358692        WD        Abnorml     140000  \n",
       "4 -0.084282  2.095727  0.145874        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 80 columns]"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "4529bedf",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:34:38.360184Z",
     "start_time": "2022-02-25T04:34:38.314670Z"
    }
   },
   "outputs": [],
   "source": [
    "data.to_csv('prepared_data.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "857ad5d0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:59:56.613689Z",
     "start_time": "2022-02-25T05:59:56.460804Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD7CAYAAACPDORaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24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Tzyh+vp6jR07Nt7lxM3atWslnb5xFBcXq67uv593vXz5ctntdr388stGhfy6devU1dWll19+WePHj5fX69UjjzyicePGGfvLL0k2m+2Mn+9oQM9SZWWlNm7cqGeeeSbqa13S2zU2m01z587V008/fdZ1mzdvVl5enhwOhyorK+X3+9XR0aFFixaptLRUd999tx544AGdOHFCkvTGG29o8eLFWrRokZYvX67PP/98hLuJvuPHj+vdd99VaWmpXn31VXm93niXFBWfffaZ6uvrVVlZqfHjx0uSxo4dq4qKCl1//fXq6OjQ0qVLVVBQoIqKijhXG3sHDx7U/fffr8LCQi1YsEB/+tOf4l1SzH300UeaN2+ejh8/rhMnTmjBggVqa2uLd1kxM3v2bH388cf64IMP9L3vfU8LFy7UAw88oPb29mF/7Us65CVp9erVeuutt/T222+Hxt544w3t27dPO3fu1O7du9Xe3q4///nPkqQDBw7ohz/8oRoaGjR+/Hjt2bNHx48f16ZNm/TCCy/olVde0fz581VVVRWvlqKmvr5e8+bN06RJkzRz5kzV19fHu6SoaG1t1dSpU3XNNdecMT516lTl5uZq/fr1cjqdqqur02233RanKmOjs7NTBQUFoX9/+MMftH37dv30pz/Vzp07tXXrVm3cuDHeZUbVV3suKChQUlKS7r33Xm3cuFHr16/X0qVLdfPNN8e71JgYGBjQ3r17NXPmTK1atSq0e7FkyRKtWrVq2F//kt6ukU6fwa1fvz7UuCS9++67ys/P15VXnv5I0MLCQr3yyivKzs7WhAkT9I1vfEOSNG3aNH3xxRf68MMPdfToURUXF0s6/SFqXw2Qy9Hu3btDH+Gcl5enl156SUVFRXGuKjr+d9/d5XLpd7/7nQKBgMaMGaNPP/1UmzZtkiQtXLhQ5eXl8Soz6s61deH3+/Xmm2/queee08GDB3Xy5Mk4VRcb59uumTJligoLC3XFFVfo17/+dRwqi50v79gkqb+/X7fccosKCwvV1tYW+oSAu+66SxUVFerp6dG4cRf/d2cv+ZCXpPnz55+xbRMIBM6aMzg4KElKSUkJjVksFgWDQfn9ft12223avHmzJMnn86m3t3cEKo+djz76SAcPHtRTTz2lDRs2yO/3q7OzUx988IEyMjLiXd6wzJw5U5988om8Xq/Gjh0ru90uu90eek5COv3pptLpn3FCwiX/gHRYHn30UY0fP14LFixQXl6eGhoa4l3SiOjp6VFvb696e3t14sQJXXfddfEuKWrOdcd24MCBs+Z9mV/Dcdn8dny5bdPZ2ak5c+boL3/5i/r6+jQ4OKidO3dqzpw55z121qxZ+uCDD3To0CFJUk1NzWX/kHfXrl2655579Prrr2vfvn1qampSQUFBaNvqcnbjjTdq4cKFevzxx9Xd3S3p9J3466+/roSEBM2dOzf0qO61116Tz+eLZ7kx9/bbb2vFihW688479cYbb0jSsH/xLwfr1q3Tfffdp6KiIq1bty7e5cTclClTdOLECbW2tkqSGhsbdeONN4b+ANPFuizO5KX/btv8+Mc/1h133KHu7m4VFhZqcHBQ8+fP13333afPPvvsnMdarVb96le/0qOPPqpAIKAbbrjhsn7419/fr4aGBm3duvWM8R/84Ae699579fOf//yy3476xS9+oS1btqi4uFh+v1+9vb2aPXu2nn/+eV111VUqLS0NvaLo6quvjne5MVVSUqKioiKlpKRo+vTpSktLU0dHh9LT0+NdWlT879bFlwYGBnTFFVfomWeeUTAYVGFhoRobG5WXlxenKmNvzJgxqq6u1vr163Xq1Cldc801qq6uHvbX5QPKAMBgl812DQAgcoQ8ABiMkAcAgxHyAGAwQh4ADEbIA4DBCHkAMBghDwAG+z/2/d2urLouHQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.FireplaceQu.hist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "c311b733",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:44.882635Z",
     "start_time": "2022-02-25T04:18:44.879625Z"
    }
   },
   "outputs": [],
   "source": [
    "data.PoolQC = data.PoolQC.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "d825b50b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:45.333133Z",
     "start_time": "2022-02-25T04:18:45.318051Z"
    }
   },
   "outputs": [],
   "source": [
    "data.MiscFeature = data.MiscFeature.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "c3d65309",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:45.568559Z",
     "start_time": "2022-02-25T04:18:45.554472Z"
    }
   },
   "outputs": [],
   "source": [
    "data.Alley = data.Alley.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "44a00e8d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:45.770094Z",
     "start_time": "2022-02-25T04:18:45.755086Z"
    }
   },
   "outputs": [],
   "source": [
    "data.Fence = data.Fence.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "0b1967a8",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:46.018647Z",
     "start_time": "2022-02-25T04:18:46.003546Z"
    }
   },
   "outputs": [],
   "source": [
    "data.FireplaceQu = data.FireplaceQu.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "43b81fa1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:46.410605Z",
     "start_time": "2022-02-25T04:18:46.391596Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MSSubClass      0.00%\n",
       "MSZoning        0.00%\n",
       "GarageYrBlt     0.00%\n",
       "GarageType      0.00%\n",
       "FireplaceQu     0.00%\n",
       "Fireplaces      0.00%\n",
       "Functional      0.00%\n",
       "TotRmsAbvGrd    0.00%\n",
       "dtype: object"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loss_rate(data)[:8]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "3ddd1bfe",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:49.383913Z",
     "start_time": "2022-02-25T04:18:49.370922Z"
    }
   },
   "outputs": [],
   "source": [
    "num_list = list(data.select_dtypes('number'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "c58f9d1b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:51.061354Z",
     "start_time": "2022-02-25T04:18:51.057362Z"
    },
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "num_list.remove('SalePrice')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "75faee3b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T04:18:51.624988Z",
     "start_time": "2022-02-25T04:18:51.608989Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>LotConfig</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Inside</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>FR2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Inside</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>Corner</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>None</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>FR2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 80 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape LandContour  \\\n",
       "0         60       RL         65.0     8450   Pave  None      Reg         Lvl   \n",
       "1         20       RL         80.0     9600   Pave  None      Reg         Lvl   \n",
       "2         60       RL         68.0    11250   Pave  None      IR1         Lvl   \n",
       "3         70       RL         60.0     9550   Pave  None      IR1         Lvl   \n",
       "4         60       RL         84.0    14260   Pave  None      IR1         Lvl   \n",
       "\n",
       "  Utilities LotConfig  ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold  \\\n",
       "0    AllPub    Inside  ...        0   None  None        None       0      2   \n",
       "1    AllPub       FR2  ...        0   None  None        None       0      5   \n",
       "2    AllPub    Inside  ...        0   None  None        None       0      9   \n",
       "3    AllPub    Corner  ...        0   None  None        None       0      2   \n",
       "4    AllPub       FR2  ...        0   None  None        None       0     12   \n",
       "\n",
       "   YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0    2008        WD         Normal     208500  \n",
       "1    2007        WD         Normal     181500  \n",
       "2    2008        WD         Normal     223500  \n",
       "3    2006        WD        Abnorml     140000  \n",
       "4    2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 80 columns]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "fec498e1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:12.437893Z",
     "start_time": "2022-02-25T05:22:12.429783Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import StandardScaler\n",
    "std = StandardScaler()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "cfb06101",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:12.642102Z",
     "start_time": "2022-02-25T05:22:12.627101Z"
    }
   },
   "outputs": [],
   "source": [
    "data[num_list] = std.fit_transform(data[num_list])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "7411d9f0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:12.871906Z",
     "start_time": "2022-02-25T05:22:12.802732Z"
    }
   },
   "outputs": [],
   "source": [
    "new_data_x = pd.get_dummies(data).drop('SalePrice', axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "769e0b25",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:13.264493Z",
     "start_time": "2022-02-25T05:22:13.202131Z"
    }
   },
   "outputs": [],
   "source": [
    "new_data_y = pd.get_dummies(data)['SalePrice']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "b2a79dda",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:13.775224Z",
     "start_time": "2022-02-25T05:22:13.753679Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "x_train, x_valid, y_train, y_valid = train_test_split(new_data_x, new_data_y, train_size=0.8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "6d1d56fa",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:18.407092Z",
     "start_time": "2022-02-25T05:22:18.392093Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1076, 302)"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "b2fa77b3",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:18.719556Z",
     "start_time": "2022-02-25T05:22:18.713556Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(270, 302)"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_valid.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "91785eed",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:19.284178Z",
     "start_time": "2022-02-25T05:22:19.255427Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>OverallQual</th>\n",
       "      <th>OverallCond</th>\n",
       "      <th>YearBuilt</th>\n",
       "      <th>YearRemodAdd</th>\n",
       "      <th>MasVnrArea</th>\n",
       "      <th>BsmtFinSF1</th>\n",
       "      <th>BsmtFinSF2</th>\n",
       "      <th>BsmtUnfSF</th>\n",
       "      <th>...</th>\n",
       "      <th>SaleType_ConLw</th>\n",
       "      <th>SaleType_New</th>\n",
       "      <th>SaleType_Oth</th>\n",
       "      <th>SaleType_WD</th>\n",
       "      <th>SaleCondition_Abnorml</th>\n",
       "      <th>SaleCondition_AdjLand</th>\n",
       "      <th>SaleCondition_Alloca</th>\n",
       "      <th>SaleCondition_Family</th>\n",
       "      <th>SaleCondition_Normal</th>\n",
       "      <th>SaleCondition_Partial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>875</th>\n",
       "      <td>0.196715</td>\n",
       "      <td>-0.166198</td>\n",
       "      <td>1.338335</td>\n",
       "      <td>-0.549472</td>\n",
       "      <td>1.144191</td>\n",
       "      <td>1.047310</td>\n",
       "      <td>-0.596381</td>\n",
       "      <td>-0.875034</td>\n",
       "      <td>-0.295297</td>\n",
       "      <td>1.222617</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1402</th>\n",
       "      <td>-0.300079</td>\n",
       "      <td>-0.383019</td>\n",
       "      <td>0.583981</td>\n",
       "      <td>-0.549472</td>\n",
       "      <td>1.110357</td>\n",
       "      <td>0.997998</td>\n",
       "      <td>-0.596381</td>\n",
       "      <td>-1.014373</td>\n",
       "      <td>-0.295297</td>\n",
       "      <td>1.600268</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>406</th>\n",
       "      <td>-0.887200</td>\n",
       "      <td>-0.022813</td>\n",
       "      <td>-0.170374</td>\n",
       "      <td>-0.549472</td>\n",
       "      <td>-1.258009</td>\n",
       "      <td>-1.763468</td>\n",
       "      <td>-0.596381</td>\n",
       "      <td>-1.014373</td>\n",
       "      <td>-0.295297</td>\n",
       "      <td>1.095217</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>600</th>\n",
       "      <td>0.151552</td>\n",
       "      <td>0.020493</td>\n",
       "      <td>1.338335</td>\n",
       "      <td>-0.549472</td>\n",
       "      <td>1.076524</td>\n",
       "      <td>0.948686</td>\n",
       "      <td>0.917263</td>\n",
       "      <td>0.174363</td>\n",
       "      <td>-0.295297</td>\n",
       "      <td>-0.160586</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>835</th>\n",
       "      <td>-0.480732</td>\n",
       "      <td>-0.108069</td>\n",
       "      <td>-1.679084</td>\n",
       "      <td>1.306461</td>\n",
       "      <td>-0.784336</td>\n",
       "      <td>0.455567</td>\n",
       "      <td>-0.596381</td>\n",
       "      <td>-0.052063</td>\n",
       "      <td>-0.295297</td>\n",
       "      <td>0.096490</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 302 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      LotFrontage   LotArea  OverallQual  OverallCond  YearBuilt  \\\n",
       "875      0.196715 -0.166198     1.338335    -0.549472   1.144191   \n",
       "1402    -0.300079 -0.383019     0.583981    -0.549472   1.110357   \n",
       "406     -0.887200 -0.022813    -0.170374    -0.549472  -1.258009   \n",
       "600      0.151552  0.020493     1.338335    -0.549472   1.076524   \n",
       "835     -0.480732 -0.108069    -1.679084     1.306461  -0.784336   \n",
       "\n",
       "      YearRemodAdd  MasVnrArea  BsmtFinSF1  BsmtFinSF2  BsmtUnfSF  ...  \\\n",
       "875       1.047310   -0.596381   -0.875034   -0.295297   1.222617  ...   \n",
       "1402      0.997998   -0.596381   -1.014373   -0.295297   1.600268  ...   \n",
       "406      -1.763468   -0.596381   -1.014373   -0.295297   1.095217  ...   \n",
       "600       0.948686    0.917263    0.174363   -0.295297  -0.160586  ...   \n",
       "835       0.455567   -0.596381   -0.052063   -0.295297   0.096490  ...   \n",
       "\n",
       "      SaleType_ConLw  SaleType_New  SaleType_Oth  SaleType_WD  \\\n",
       "875                0             1             0            0   \n",
       "1402               0             1             0            0   \n",
       "406                0             0             0            1   \n",
       "600                0             0             0            1   \n",
       "835                0             0             0            1   \n",
       "\n",
       "      SaleCondition_Abnorml  SaleCondition_AdjLand  SaleCondition_Alloca  \\\n",
       "875                       0                      0                     0   \n",
       "1402                      0                      0                     0   \n",
       "406                       0                      0                     0   \n",
       "600                       0                      0                     0   \n",
       "835                       0                      0                     0   \n",
       "\n",
       "      SaleCondition_Family  SaleCondition_Normal  SaleCondition_Partial  \n",
       "875                      0                     0                      1  \n",
       "1402                     0                     0                      1  \n",
       "406                      0                     1                      0  \n",
       "600                      0                     1                      0  \n",
       "835                      0                     1                      0  \n",
       "\n",
       "[5 rows x 302 columns]"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "7234d58d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:19.817282Z",
     "start_time": "2022-02-25T05:22:19.804289Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.19671489, -0.16619791,  1.33833544, ...,  0.        ,\n",
       "         0.        ,  1.        ],\n",
       "       [-0.30007935, -0.38301918,  0.58398054, ...,  0.        ,\n",
       "         0.        ,  1.        ],\n",
       "       [-0.88719982, -0.02281298, -0.17037436, ...,  0.        ,\n",
       "         1.        ,  0.        ],\n",
       "       ...,\n",
       "       [-0.97752604,  0.43989407,  1.33833544, ...,  0.        ,\n",
       "         1.        ,  0.        ],\n",
       "       [ 0.10638867, -0.17346404,  1.33833544, ...,  0.        ,\n",
       "         1.        ,  0.        ],\n",
       "       [-0.4807318 ,  0.45229493,  0.58398054, ...,  0.        ,\n",
       "         1.        ,  0.        ]])"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array(x_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "id": "8d5e2d2b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:57:27.533030Z",
     "start_time": "2022-02-25T05:57:27.346955Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD7CAYAAACPDORaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXGElEQVR4nO3df2xV9eH/8dctLZV9wDjYvcI6wpLNhKXJaAOZ60JuA263LZdr8YoRUZqNbMLiygBTYKV2QcVh06WxcyQmGsyYxgFSWrpalsgk03b8aDYalm46RisUvL0FXVuk97a97+8fhPv9ID96L9zSe9+f5yMxct73fe77dY7lxfXccy8OY4wRAMBKaeMdAAAwdih5ALAYJQ8AFqPkAcBilDwAWIySBwCLUfIAYLH08Q7wRZ9+elGRyPjeuj9t2mSdPz8wrhniQd6xk0pZpdTKm0pZpeTNm5bm0Je//D83fDzpSj4SMeNe8ldypBLyjp1UyiqlVt5UyiqlXl6JyzUAYDVKHgAsRskDgMUoeQCwGCUPABaj5AHAYpQ8AFgs6e6TT0VT7p6kuzLv/KkcDA2rv+/SHV8XQOqg5BPgrsx0+Z6uv+Pr7v91sfrv+KoAUgmXawDAYpQ8AFiMkgcAi1HyAGCxmN54XbFihS5cuKD09MvTn332WV28eFG/+tWvFAqFVFRUpHXr1kmSOjo6tHnzZl28eFHz5s3Tli1bovsBAO6sUdvXGKPOzk79+c9/jpb14OCgCgsLtXPnTs2YMUOrVq3SoUOHlJ+fr7KyMj3//PPKyclReXm5du3apeXLl4/5gQAArjXq5Zr//Oc/kqSVK1fqwQcf1O9//3u1t7dr1qxZmjlzptLT0+Xz+dTc3Kzu7m4NDg4qJydHkuT3+9Xc3DymB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3rx5ysjIUH5+vurrL//9n8eOHVNmZqa++tWvjprt3Llzeuqpp1RdXS2v15v0ec+cOaOKigqFw2GFw2G9++67WrZsWVLm3bFjhxobG1VfX681a9Zo4cKFevXVV5MyqyT19/erqqpKoVBIAwMDqqur0/r165My74IFC/T++++rr69PIyMj+stf/qLCwsKkzHrFv/71L33961/Xl770JUnJ/fss4cboWv+4u/LGqzGX77Dw+XzG4/GYrVu3mkgkYowxpqOjwzz88MOmoKDArF+/3oRCIWPM5TcVn3jiCVNUVGRWrlxpPvvsM2PM5TfyVq1aZRYtWmQeffTR6PMPDg6aDRs2mEWLFpklS5aYEydOxJTxueeeMzk5OebBBx+M/vPmm28mbV5jjKmtrTVFRUVm8eLFpra2NqnP7xVvv/222bhxY9JnrampMYWFhcbj8ZjXX389qfPu3r3beL1e4/F4zJYtW8zIyEjSZjXGmD/+8Y9m7dq1V40lc95E4gvKAMBi1l+uAYD/yyh5ALAYJQ8AFqPkAcBilDwAWIySBwCLUfIAYDFKHgAs9v8AV7T4/xUcE60AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "y_train.hist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "a638b27b",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T05:22:22.267709Z",
     "start_time": "2022-02-25T05:22:22.261117Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1076, 302) (1076,)\n"
     ]
    }
   ],
   "source": [
    "print(x_train.shape, y_train.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "id": "abf9f396",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:11:13.607060Z",
     "start_time": "2022-02-25T06:11:13.528068Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential\"\n",
      "_________________________________________________________________\n",
      " Layer (type)                Output Shape              Param #   \n",
      "=================================================================\n",
      " dense (Dense)               (None, 300)               90900     \n",
      "                                                                 \n",
      " dense_1 (Dense)             (None, 200)               60200     \n",
      "                                                                 \n",
      " dense_2 (Dense)             (None, 100)               20100     \n",
      "                                                                 \n",
      " dense_3 (Dense)             (None, 1)                 101       \n",
      "                                                                 \n",
      "=================================================================\n",
      "Total params: 171,301\n",
      "Trainable params: 171,301\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "keras.backend.clear_session()\n",
    "tf.random.set_seed(42)\n",
    "np.random.seed(42)\n",
    "model = keras.models.Sequential([\n",
    "    keras.layers.InputLayer(input_shape=x_train.shape[1:]),\n",
    "    keras.layers.Dense(300, activation='relu'),\n",
    "    keras.layers.Dense(200, activation='relu'),\n",
    "    keras.layers.Dense(100, activation='relu'),\n",
    "    keras.layers.Dense(1),\n",
    "])\n",
    "# model.summary 可以显示出网络结构的具体信息\n",
    "model.summary()\n",
    "# 编译模型， 损失函数为均方误差函数，优化函数为随机梯度下降\n",
    "model.compile(loss=keras.losses.mean_squared_error, optimizer=keras.optimizers.Adadelta())\n",
    "# 回调函数使用了EarlyStopping，patience设为5， 阈值设置为1e-2\n",
    "callbacks = [keras.callbacks.EarlyStopping(patience=5, min_delta=1e-2)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "6ef20c89",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:25:02.614524Z",
     "start_time": "2022-02-25T06:25:00.406713Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 988612544.0000 - val_loss: 1023731200.0000\n",
      "Epoch 2/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 988490432.0000 - val_loss: 1023729216.0000\n",
      "Epoch 3/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 988357632.0000 - val_loss: 1023716736.0000\n",
      "Epoch 4/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 988248832.0000 - val_loss: 1023709184.0000\n",
      "Epoch 5/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 988135616.0000 - val_loss: 1023731776.0000\n",
      "Epoch 6/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 987996416.0000 - val_loss: 1023720960.0000\n",
      "Epoch 7/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 987878848.0000 - val_loss: 1023701056.0000\n",
      "Epoch 8/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 987735616.0000 - val_loss: 1023694272.0000\n",
      "Epoch 9/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 987626880.0000 - val_loss: 1023727040.0000\n",
      "Epoch 10/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 987522560.0000 - val_loss: 1023726464.0000\n",
      "Epoch 11/1000\n",
      "34/34 [==============================] - 0s 2ms/step - loss: 987389184.0000 - val_loss: 1023707136.0000\n",
      "Epoch 12/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 987283200.0000 - val_loss: 1023681664.0000\n",
      "Epoch 13/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 987155840.0000 - val_loss: 1023672896.0000\n",
      "Epoch 14/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 987027648.0000 - val_loss: 1023656640.0000\n",
      "Epoch 15/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 986941248.0000 - val_loss: 1023670976.0000\n",
      "Epoch 16/1000\n",
      "34/34 [==============================] - 0s 4ms/step - loss: 986805824.0000 - val_loss: 1023687616.0000\n",
      "Epoch 17/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 986684224.0000 - val_loss: 1023699264.0000\n",
      "Epoch 18/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 986580288.0000 - val_loss: 1023704704.0000\n",
      "Epoch 19/1000\n",
      "34/34 [==============================] - 0s 3ms/step - loss: 986426304.0000 - val_loss: 1023701824.0000\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(x_train, y_train, \n",
    "                    epochs=1000, validation_data=(x_valid, y_valid), callbacks=callbacks)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "ec36d461",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:25:02.833533Z",
     "start_time": "2022-02-25T06:25:02.617831Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmEAAAHfCAYAAAAY3Q/TAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAA8zUlEQVR4nO3de3hU9b3v8c9MZhIICQbohFQeHjmtrdhdlbY5j3gplFZJIMmORmWLlLiNXHTbihxLy6UQG6UUNh5oRXna7hZ2rSixHpOm5SKyj1iKpwpuIVq0WovKLSQByYUkc1vnjySTmWQNSUjCL5O8X8+DmbV+a81a6zsr4yfrty4Oy7IsAQAA4KJyml4BAACAwYgQBgAAYAAhDAAAwABCGAAAgAGEMAAAAAMIYQAAAAbEdAirq6tTdna2jh49et7p9uzZo5ycHOXk5Ojhhx9WfX39RVpDAAAAezEbwg4ePKiZM2fqyJEj552upqZGixcv1rp161RWVqbx48dr3bp1F2clAQAAoojZEFZcXKzCwkKlpqaGxpWUlOjWW29Vbm6uli5dqqamJh05ckSXXnqpLr/8cknSlClT9PLLL5tabQAAAEkxHMJWrlyp9PT00PD777+v4uJiPffccyotLdWoUaP0q1/9SuPGjdPJkyf17rvvSpK2b9+uqqoqU6sNAAAgSXKZXoHe8pe//EUfffSRZsyYIUny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bKlCmaPHmybrnlFt1222267bbb9JWvfGXQ7y+tPvnkE6WlpUWMG+z7TKuEhAT95Cc/0Xe/+11Nnz5dn/vc55SZmSlJWrZsmXbv3i1JKiwsVHFxsaZPn679+/froYceMrjWfe93v/udqqqqtGnTptB3zU9/+lNJbXWJi4vT+vXr9cgjj2jatGl65513tGjRIsNr3vfGjx+vefPmaebMmcrKytKVV16p7OxsSYN7n5Gko0ePdviukWJzn3FYlmWZXgkAAIDBZlAfCQMAADCFEAYAAGAAIQwAAMAAQhgAAIABhDAAAAADCGEAAAAGEMIAAAAM+P/u2S5g/+2jMwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x576 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import seaborn as sns\n",
    "sns.set()\n",
    "pd.DataFrame(history.history).plot(figsize=(10,8))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3bb31756",
   "metadata": {},
   "source": [
    "# 后面过程需要重新调整，测试集应与训练集组成一致"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "id": "9cdd4e9c",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T07:01:52.357819Z",
     "start_time": "2022-02-25T07:01:52.323133Z"
    }
   },
   "outputs": [],
   "source": [
    "test = pd.read_csv('test.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 256,
   "id": "a1b41234",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T07:01:52.467344Z",
     "start_time": "2022-02-25T07:01:52.460344Z"
    }
   },
   "outputs": [],
   "source": [
    "test.drop('Id', axis=1, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0ee551a2",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2022-02-25T07:01:52.616Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 257,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import missingno as msno\n",
    "msno.matrix(test, labels=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "847af632",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2022-02-25T07:01:52.766Z"
    }
   },
   "outputs": [],
   "source": [
    "test.MSSubClass = test.MSSubClass.astype(str)\n",
    "test.LotFrontage.fillna(test.LotFrontage.mean(), inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "31047634",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2022-02-25T07:01:52.923Z"
    }
   },
   "outputs": [],
   "source": [
    "test.Alley = test.Alley.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3be3572e",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2022-02-25T07:01:53.091Z"
    },
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "loss_rate(test)[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4b3db5f6",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2022-02-25T07:01:53.263Z"
    }
   },
   "outputs": [],
   "source": [
    "test.PoolQC = test.PoolQC.fillna('None')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 209,
   "id": "70fa43e1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:48:55.272537Z",
     "start_time": "2022-02-25T06:48:55.260537Z"
    }
   },
   "outputs": [],
   "source": [
    "test.MiscFeature.fillna('None', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "id": "96c7d113",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:49:15.318260Z",
     "start_time": "2022-02-25T06:49:15.312079Z"
    }
   },
   "outputs": [],
   "source": [
    "test.Fence.fillna('None', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "id": "3134462f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:51:30.523500Z",
     "start_time": "2022-02-25T06:51:30.514003Z"
    }
   },
   "outputs": [],
   "source": [
    "test.FireplaceQu.fillna(test.FireplaceQu.mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "id": "47c0f16f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:51:40.421080Z",
     "start_time": "2022-02-25T06:51:40.416005Z"
    }
   },
   "outputs": [],
   "source": [
    "test.KitchenQual.fillna(test.KitchenQual.mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "id": "daf84db6",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:53:21.263396Z",
     "start_time": "2022-02-25T06:53:21.253396Z"
    }
   },
   "outputs": [],
   "source": [
    "for i in ['BsmtFinSF2', 'TotalBsmtSF', 'Exterior2nd', 'Exterior1st', 'BsmtFinSF1', 'GarageCars']:\n",
    "    test[i].fillna(test[i].mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "id": "e42b63ea",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:55:04.601728Z",
     "start_time": "2022-02-25T06:55:04.589730Z"
    }
   },
   "outputs": [],
   "source": [
    "for i in ['BsmtUnfSF', 'GarageArea', 'SaleType', 'Utilities', 'BsmtFullBath', 'Functional']:\n",
    "    test[i].fillna(test[i].mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 236,
   "id": "5b1117c7",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:56:03.584572Z",
     "start_time": "2022-02-25T06:56:03.566158Z"
    }
   },
   "outputs": [],
   "source": [
    "for i in ['BsmtHalfBath', 'MSZoning', 'MasVnrArea', 'MasVnrType', 'BsmtFinType1', 'BsmtFinType2']:\n",
    "    test[i].fillna(test[i].mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "id": "9c711af1",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:56:40.778115Z",
     "start_time": "2022-02-25T06:56:40.768115Z"
    }
   },
   "outputs": [],
   "source": [
    "for i in ['BsmtQual', 'BsmtExposure', 'BsmtCond', 'GarageType', 'GarageYrBlt', 'GarageQual']:\n",
    "    test[i].fillna(test[i].mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "id": "c59aab8e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:57:11.312199Z",
     "start_time": "2022-02-25T06:57:11.294190Z"
    }
   },
   "outputs": [],
   "source": [
    "for i in ['GarageCond', 'GarageFinish']:\n",
    "    test[i].fillna(test[i].mode().values[0], inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "id": "c5a36711",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:58:24.362383Z",
     "start_time": "2022-02-25T06:58:24.344326Z"
    }
   },
   "outputs": [],
   "source": [
    "num_list = list(test.select_dtypes('number'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "id": "3690363a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:58:48.273213Z",
     "start_time": "2022-02-25T06:58:48.251030Z"
    }
   },
   "outputs": [],
   "source": [
    "test[num_list] = std.fit_transform(test[num_list])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "id": "240b86f0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:59:00.654102Z",
     "start_time": "2022-02-25T06:59:00.609136Z"
    }
   },
   "outputs": [],
   "source": [
    "test = pd.get_dummies(test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "id": "ee869153",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T07:01:17.009978Z",
     "start_time": "2022-02-25T07:01:16.998986Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MSSubClass_150\n",
      "Exterior1st_AsphShn\n",
      "ExterCond_Po\n",
      "Foundation_Slab\n",
      "Heating_Wall\n"
     ]
    }
   ],
   "source": [
    "for i in list(test):\n",
    "    if i not in list(x_train):\n",
    "        print(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "id": "07a8b28f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:59:06.939789Z",
     "start_time": "2022-02-25T06:59:06.920789Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1459, 289)"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "id": "4d54fab0",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-02-25T06:57:22.449365Z",
     "start_time": "2022-02-25T06:57:22.444366Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<keras.engine.sequential.Sequential at 0x217ffca62b0>"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "price = model.predict(test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f5ff256f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
